
$(document).ready(function() {
	initTable();
});


var initTable =function(){
	var table = new Table();
	//表格加载的字段
    var cloumns = [
		    { 'data': 'id','render': function (data) {return '<input type="checkbox" data-id="' + data + '" name="">';}},
		    {'data': 'role_name'},
		    {'data': 'description'},
		    {'data': 'create_date'},
		    {'data': 'id','render':function(data){return table.delBtn(data)+table.editBtn('编辑角色',basePath+"/role/toEditRole?id="+data,'1')+'<a title="查看权限" href="javascript:;" onclick="toEdit(\'权限\',\''+basePath+'/role/toEditRolePer?id='+data+'\',\'1\')" class="btn btn-warning radius size-MINI" style="margin-right:10px;" >权限</a>';}}
		  ];
	//设置URL和加载的字段
    table.setting(basePath+"/role/getRoleList",basePath+"/role/delRole",cloumns);
	//调用表格分页
    table.tablePage();
}


